package com.hoshiicloud.common.constant;

/**
 * @author Markerccc
 * @date 2019/9/9 - 18:13
 */
public enum ReturnGoodsStatusEnum {

    /**
     * 无需退货
     */
    NO_NEED_TO_RETURN(0, "无需退货"),

    /**
     * 未退货
     */
    NOT_RETURN(1, "未退货"),

    /**
     * 已部分退货
     */
    PART_OF_THE_RETURN(2, "已部分退货"),

    /**
     * 已全部退货
     */
    FULL_RETURN(3, "已全部退货");

    private int code;

    private String name;

    ReturnGoodsStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static ReturnGoodsStatusEnum get(int code) {
        for (ReturnGoodsStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }
}
